package cn.cdyx.ydhl.config;

import cn.cdyx.ydhl.filter.YDHLFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author Watermelon
 * @Date 2023-02-02 11:22
 */
@Configuration
public class YDHLFilterConfig {
    @Bean
    public FilterRegistrationBean ydhlFilterRegisterationBean(){
        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new YDHLFilter());
        filterRegistrationBean.addUrlPatterns("/ydhl/*");
        return filterRegistrationBean;
    }
}
